linux

您所在的位置:网站首页 crontab -e no such file linux

linux

#linux| 来源: 网络整理| 查看: 265

I am trying to set up a cron job in my user crontab on a debian 11 image on a VPS.

But I have issues and cannot open crontab:

flo@debian-2gb:~$ crontab -e crontabs: No such file or directory flo@debian-2gb:~$ crontab -l crontabs: No such file or directory flo@debian-2gb:~$ sudo crontab -l crontabs: No such file or directory crontabs: mkdir: Operation not permitted flo@debian-2gb:$ file /usr/bin/crontab /usr/bin/crontab: setgid ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=e7fb2e8014f70bd0f4222e0c69566c721a323513, for GNU/Linux 3.2.0, stripped

I tried echo "export EDITOR=nano" >> ~/.bashrc and sourced it, since it was not set, but it did not help.

I tried to reinstall cron:

flo@debian-2gb:~$ sudo apt-get reinstall cron Reading package lists... Done Building dependency tree... Done Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 25 not upgraded. Need to get 99.6 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://deb.debian.org/debian bullseye/main amd64 cron amd64 3.0pl1-137 [99.6 kB] Fetched 99.6 kB in 0s (3470 kB/s) perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "UTF-8", LC_TERMINAL = "iTerm2", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to a fallback locale ("en_US.UTF-8"). locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory (Reading database ... 59567 files and directories currently installed.) Preparing to unpack .../cron_3.0pl1-137_amd64.deb ... Unpacking cron (3.0pl1-137) over (3.0pl1-137) ... dpkg: error processing archive /var/cache/apt/archives/cron_3.0pl1-137_amd64.deb (--unpack): unable to create '/etc/cron.d/.placeholder.dpkg-new' (while processing './etc/cron.d/.placeholder'): Operation not permitted dpkg-deb: error: paste subprocess was killed by signal (Broken pipe) Errors were encountered while processing: /var/cache/apt/archives/cron_3.0pl1-137_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

I have debian running on another vps and there I have no issues editing my crontab, same locale on both systems.

I have absolutely no clue what the problem is, and all solutions I have found so far did not help. How can I debug this?

Thanks!

EDIT

root@debian-2gb:/# ls -ld /var/spool/cron/crontabs/ ls: cannot access '/var/spool/cron/crontabs/': No such file or directory

EDIT 2

ls -al /var/spool/ total 16 drwxr-xr-x 4 root root 4096 Nov 23 10:33 . drwxr-xr-x 11 root root 4096 Nov 23 10:33 .. drwxr-xr-x 2 root root 4096 Jan 18 01:54 cron lrwxrwxrwx 1 root root 7 Nov 23 10:33 mail -> ../mail drwx------ 2 root root 4096 Feb 17 2021 rsyslog cat /etc/*-release PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" NAME="Debian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3